/*
 * 描述: 封装组件库
 * 作者: Hanyue
 * 日期: 2021-06-17
 */

import projectCenter from './projectCenter' // 项目展示中心
import userCenter from './userCenter' // 个人中心
import jxyxPart from './reportArea/jxyxPart' // 教学运行
import xuejiPart from './reportArea/xuejiPart' // 学籍情况
import kscjPart from './reportArea/kscjPart' // 考试成绩
import byxwPart from './reportArea/byxwPart' // 毕业学位
import secKcks from './reportArea/secKcks' // 课程开设情况
import xueqibg from './xueqibg' // 学期报告
import hyCarousel from './hyCarousel' // 图片轮播

const components = {

  projectCenter,
  userCenter,
  jxyxPart,
  xuejiPart,
  kscjPart,
  byxwPart,
  secKcks,
  xueqibg,
  hyCarousel
  
};

const install = (Vue = {}) => {
  if (install.installed) return;
  Object.keys(components).forEach(component => {
    Vue.component(components[component].name, components[component]);
  });

  install.installed = true;
};

install.installed = false;

if (typeof window !== "undefined" && window.Vue) {
  install(window.Vue);
  install.installed = true;
}

const Vcomp = {
  ...components,
  install
};


export default Vcomp
